<template>
	<view class="bg_fff mb-20 itemBox" @click.stop="clckItem">
		<view class="pd-20 display_row_btn_center" style="padding-right: 0;position: relative;">
			<view class="itemBaseBox">
				<u-image :src="dataItem.popuPlatformInfo.image" width="130rpx" height="130rpx"></u-image>
				<view class="itemBase f_30">
					<text class="c_333333 title">{{dataItem.nickname||""}}</text>
					<text class="c_999999 mt-8" f-26>{{dataItem.acc_id||""}}</text>
					<text class="c_C62B2C status f-24">{{dataItem.categoryInfo.name||""}}</text>
				</view>
			</view>
			<view style="position: absolute;top: 0;right: 0;">
				<view class="itemStatus">
					<u-image
						src="https://dtkj-qnyimg.diankuai.com/%E6%88%91%E7%9A%84%E8%B4%A6%E5%8F%B7/%E6%A4%AD%E5%9C%86%201%20%E6%8B%B7%E8%B4%9D.png"
						width="70rpx" height="70rpx" v-if="dataItem.status==0">
					</u-image>
					<u-image
						src="https://dtkj-qnyimg.diankuai.com/%E6%88%91%E7%9A%84%E8%B4%A6%E5%8F%B7/%E6%A4%AD%E5%9C%86%201.png"
						width="70rpx" height="70rpx" v-else>
					</u-image>

					<text v-if="dataItem.status==0" class="c_ffffff f_26">停用</text>
					<text v-else class="c_ffffff f_26">正常</text>
				</view>
			</view>
		</view>
		<u-divider :customStyle="{margin:'0px'}"></u-divider>
		<view class="pd-20 display_row_btn_center f_28">
			<view class="c_999999 ml-10">粉丝量：{{dataItem.fans_num||0}}</view>
			<view class="c_999999">创建时间：{{fomatDate(dataItem.create_at)}}</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "MissionItem",
		props: {
			dataItem: {
				type: Object,
				default: null
			}
		},
		data() {
			return {

			};
		},
		methods: {
			fomatDate(date) {
				if (date) {
					return date.substring(0, 11);
				} else {
					return "";
				}
			},
			clckItem() {
				this.$emit("clickItem", this.dataItem);
			}
		}
	}
</script>

<style scoped>
	.itemBox {
		width: 90%;
		border-radius: 20rpx;
		box-sizing: border-box;
		margin-left: 5%;
	}

	.itemBaseBox {
		display: flex;
		flex-direction: row;
		justify-content: flex-start;
		align-items: center;
		flex: 6;
	}

	.itemBase {
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		margin-left: 20rpx;
		flex: 2;
	}

	.title {
		font-size: 36rpx;
		font-weight: 600;
	}

	.status {
		width: 120rpx;
		border-radius: 100rpx;
		text-align: center;
		color: #fff;
		background-color: #C62B2C;
		font-size: 24rpx !important;
	}

	.itemStatus {
		position: relative;
	}

	.itemStatus>text {
		position: absolute;
		top: 8rpx;
		right: 8rpx;
	}
</style>
